Support for Python 3.14#4303
Conversation
This reverts commit 9b41126.
|
@bouweandela all done the Pixi work here - as expected, pys2index is not playing ball, but there are ways we can replace it (I really don't want to spend the work to rebuild it with the new abseil TBF); one alternative is sklearn - @schlunma likes that lib: from sklearn.neighbors import BallTree
import numpy as np
points = np.radians([
[51.5074, -0.1278], # London
[48.8566, 2.3522], # Paris
])
tree = BallTree(points, metric='haversine')
query = np.radians([[51.5, -0.1]])
dist, ind = tree.query(query, k=1)
print(ind)I suggest we mark that cmorizer Not Working until we find a replacement for pys2index, and skip the test here, so we can crack on with support for Python 3.14? 🍺 |
We might also be able to replace this with our existing unstructured regridding features, which have grown really powerful.
Agreed. We should definitely not postpone Python 3.14 any longer because of a single CMORizer. If we want to be super thorough, we could provide a pixi environment that includes pys2index for users that need to run this CMORizer (that pulls in Python 3.13). |
|
thanks @schlunma 🍺 I'll crack on here with an Xfail on that test and a mention in the docs; TBF I think having a separate Pixi env just for that cmorizer may be overkill, but then again am also quite new to Pixi mentality - @bouweandela what you reckon? |
| "progressbar2", | ||
| "pyproj>=2.1", | ||
| "pys2index", | ||
| # "pys2index", |
There was a problem hiding this comment.
Could we put this dependency in a feature and add that feature to the Python 3.12 and 3.13 envs only? Like that it will still work if you use a development installation with one of those.
There was a problem hiding this comment.
mhm that's a good idea!
|
It would be nice to at least open an issue about replacing pys2index with the proposed steps to do so, if we plan to do that. The problem seems to be that the main dependency of pys2index, s2geometry needs a rather specific version of abseil conda-forge/s2geometry-feedstock#35 (comment), but abseil is globally pinned on conda-forge so it may not be possible to build s2geometry at all with the most recent conda-forge global pins. A possible solution would be to try static linking instead. |
given how poorly maintained pys2index (so the top stack) is I doubt we should pay any effort, buds - unless we take over its maintenance, but frankly, am not keen on that, am already maintaining too many packages that I can afford 😁 |
Description
ESMValCore supports Python 3.14 via ESMValGroup/ESMValCore#2850
Initial hurdle was pys2index, see conda-forge/pys2index-feedstock#31 but there are quite a few more deps that need looking into, unfortunately https://github.com/ESMValGroup/ESMValTool/actions/runs/20717475462/job/59472088226?pr=4303 at least with cdo=2.5.4 in the pipes conda-forge/cdo-feedstock#172
Also keep an eye on Matplotlib's feedstock https://github.com/conda-forge/matplotlib-feedstock/pulls
Before you get started
Checklist
It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.